package com.qst.repository;

import com.qst.pojo.entity.Driver;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 司机数据访问�?
 */
@Repository
public interface DriverRepository extends JpaRepository<Driver, Integer> {
    
    /**
     * 根据状态查询司机列
     */
    List<Driver> findByStatus(Driver.DriverStatus status);
    
    /**
     * 根据姓名模糊查询
     */
    List<Driver> findByNameContaining(String name);
    
    /**
     * 根据电话查询
     */
    Driver findByPhone(String phone);
}


